package aconcagua.measure

class UnitsTestResource {

	// meter units
	static METER = new BaseUnit("meter");
	static KILOMETER = new ProportionalDerivedUnit(METER, 1000, "kilometer", "km");
	static CENTIMETER = new ProportionalDerivedUnit(METER, 1/100, "centimeter", "cm");
	static MILLIMETER = new ProportionalDerivedUnit(METER, 1/1000, "millimeter", "mm");

	// monetary units
	static PESO = new BaseUnit("peso");
	static DOLLAR = new BaseUnit("dollar");
	static EURO = new BaseUnit("euro");
	
	// temperature units
	static KELVIN = new BaseUnit("kelvin", "kelvin", "K");
	static CELSIUS = new NotProportionalDerivedUnit(KELVIN,
		{ kelvin -> kelvin + (5463/20) },
		{ celsius -> celsius - (5463/20) },
		"celsius",
		"celsius",
		"C");
	static FAHRENHEIT = new NotProportionalDerivedUnit(KELVIN,
		{ kelvin -> (kelvin - 32) * (5/9)  +  (27315/100) },
		{ fahrenheit -> (fahrenheit - (27315/100)) * 9/5 + 32 },
		"fahrenheit",
		"fahrenheit",
		"F");
	
	// time units
	static SECOND = new BaseUnit("second");
	static MINUTE = new ProportionalDerivedUnit(SECOND, 60, "minute");
}
